package com.shinewind.home.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shinewind.home.mapper.INewsMapper;
import com.shinewind.home.service.INewsService;
import com.shinewind.pojo.entity.News;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DubboService
public class NewsServiceImpl extends ServiceImpl<INewsMapper, News> implements INewsService {
    @Override
    public List<News> getNewsInfo() {
        List<News> newsList = this.lambdaQuery().list();
        return newsList;
    }

    @Override
    public News getNewsInfoById(String mId) {
        News news = this.lambdaQuery().eq(News::getId,mId).one();
        return news;
    }
}
